<template>
  <view class="wrap">
    <u-toast ref="uToast" />
    <textarea :border="border" placeholder="请输入跟进内容" class="textarea" v-model="content" />
    <u-button type="primary" hover-class="none" shape="circle" @click="submit">提交</u-button>
  </view>
</template>
<style lang="scss" scoped>
  .wrap {
    background-color: #fff;
    height: 100vh;
    padding: 30rpx;
  }

  .textarea {
    border: 1px solid #ededed;
    padding: 20rpx;
    margin-bottom: 40rpx;
    box-sizing: border-box;
    display: block;
    width: 100%;
  }
</style>
<script>
  export default {
    data() {
      return {
        content: '',
        id: ''
      }
    },
    onLoad(e) {
      this.id = e.id;

    },
    watch: {

    },

    methods: {
      submit() {
        this.$api.appendHousingResourcesApi({
          house_sn: this.id,
          content: this.content
        }).then(res => {
          if (res.code === 1) {
            this.$refs.uToast.show({
              title: res.msg,
            })
            setTimeout(() => {
              uni.navigateBack()
            }, 1000)
          } else {
            this.$refs.uToast.show({
              title: res.msg,
            })
          }
        })
      },
    },
    onShareAppMessage() {
      // return {
      //   title: '',
      //   path: '/pages/index/index',
      // }
    },
  }
</script>